home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- _X_m_C_o_m_m_a_n_d - The Command widget class
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <Xm/Command.h>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Command is a special-purpose composite widget for command
- entry that provides a built-in command-history mechanism.
- Command includes a command-line text-input field, a
- command-line prompt, and a command-history list region.
-
- One additional _W_o_r_k_A_r_e_a child may be added to the Command
- after creation.
-
- Whenever a command is entered, it is automatically added to
- the end of the command-history list and made visible. This
- does not change the selected item in the list, if there is
- one.
-
- Many of the new resources specified for Command are actually
- SelectionBox resources that have been renamed for clarity
- and ease of use.
-
- CCCCllllaaaasssssssseeeessss
- Command inherits behavior and resources from _C_o_r_e,
- _C_o_m_p_o_s_i_t_e, _C_o_n_s_t_r_a_i_n_t, _X_m_M_a_n_a_g_e_r, _X_m_B_u_l_l_e_t_i_n_B_o_a_r_d, and
- _X_m_S_e_l_e_c_t_i_o_n_B_o_x classes.
-
- The class pointer is _x_m_C_o_m_m_a_n_d_W_i_d_g_e_t_C_l_a_s_s.
-
- The class name is _X_m_C_o_m_m_a_n_d.
-
- NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss
- The following table defines a set of widget resources used
- by the programmer to specify data. The programmer can also
- set the resource values for the inherited classes to set
- attributes for this widget. To reference a resource by name
- or by class in a .Xdefaults file, remove the _X_m_N or _X_m_C
- prefix and use the remaining letters. To specify one of the
- defined values for a resource in a .Xdefaults file, remove
- the _X_m prefix and use the remaining letters (in either
- lowercase or uppercase, but include any underscores between
- words). The codes in the access column indicate if the
- given resource can be set at creation time (C), set by using
- _X_t_S_e_t_V_a_l_u_e_s (S), retrieved by using _X_t_G_e_t_V_a_l_u_e_s (G), or is
- not applicable (N/A).
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
-
-
-
-
-
- Page 1 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- ____________________________________________________________________________________
- XmNcommand XmCTextString XmString "" CSG
- XmNcommandChangedCallback XmCCallback XtCallbackList NULL C
- XmNcommandEnteredCallback XmCCallback XtCallbackList NULL C
- XmNhistoryItems XmCItems XmStringTable NULL CSG
- XmNhistoryItemCount XmCItemCount int 0 CSG
- XmNhistoryMaxItems XmCMaxItems int 100 CSG
- XmNhistoryVisibleItemCount XmCVisibleItemCount int dynamic CSG
- XmNpromptString XmCPromptString XmString dynamic CSG
-
-
- _X_m_N_c_o_m_m_a_n_d
- Contains the current command-line text. This is the
- _X_m_N_t_e_x_t_S_t_r_i_n_g resource in SelectionBox, renamed for
- Command. This resource can also be modified via
- _X_m_C_o_m_m_a_n_d_S_e_t_V_a_l_u_e and _X_m_C_o_m_m_a_n_d_A_p_p_e_n_d_V_a_l_u_e functions.
- The command area is a Text widget.
-
- _X_m_N_c_o_m_m_a_n_d_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k
- Specifies the list of callbacks that is called when the
- value of the command changes. The callback reason is
- _X_m_C_R__C_O_M_M_A_N_D__C_H_A_N_G_E_D. This is equivalent to the
- _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k of the Text widget, except that
- a pointer to an _X_m_C_o_m_m_a_n_d_C_a_l_l_b_a_c_k_S_t_r_u_c_t_u_r_e is passed,
- and the structure's vvvvaaaalllluuuueeee member contains the _X_m_S_t_r_i_n_g.
-
- _X_m_N_c_o_m_m_a_n_d_E_n_t_e_r_e_d_C_a_l_l_b_a_c_k
- Specifies the list of callbacks that is called when a
- command is entered in the Command. The callback reason
- is _X_m_C_R__C_O_M_M_A_N_D__E_N_T_E_R_E_D. A pointer to an
- _X_m_C_o_m_m_a_n_d_C_a_l_l_b_a_c_k structure is passed.
-
- _X_m_N_h_i_s_t_o_r_y_I_t_e_m_s
- Lists _X_m_S_t_r_i_n_g items that make up the contents of the
- history list. This is the _X_m_N_l_i_s_t_I_t_e_m_s resource in
- SelectionBox, renamed for Command. _X_t_G_e_t_V_a_l_u_e_s for
- this resource returns the list items themselves, not a
- copy of the list items. The application must not free
- the returned items.
-
- _X_m_N_h_i_s_t_o_r_y_I_t_e_m_C_o_u_n_t
- Specifies the number of _X_m_S_t_r_i_n_g_s in _X_m_N_h_i_s_t_o_r_y_I_t_e_m_s.
- This is the _X_m_N_l_i_s_t_I_t_e_m_C_o_u_n_t resource in SelectionBox,
- renamed for Command. The value must not be negative.
-
- _X_m_N_h_i_s_t_o_r_y_M_a_x_I_t_e_m_s
- Specifies the maximum number of items allowed in the
- history list. Once this number is reached, an existing
- list item must be removed before a new item can be
- added to the list. For each command entered, the first
- list item is removed from the list, so the new command
- can be added to the list. The value must be greater
-
-
-
- Page 2 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- than 0.
-
- _X_m_N_h_i_s_t_o_r_y_V_i_s_i_b_l_e_I_t_e_m_C_o_u_n_t
- Specifies the number of items in the history list that
- should be visible at one time. In effect, it sets the
- height (in lines) of the history list window. This is
- the _X_m_N_l_i_s_t_V_i_s_i_b_l_e_I_t_e_m_C_o_u_n_t resource in SelectionBox,
- renamed for Command. The value must be greater than 0.
- The default is dynamic based on the height of the list.
-
- _X_m_N_p_r_o_m_p_t_S_t_r_i_n_g
- Specifies a prompt for the command line. This is the
- _X_m_N_s_e_l_e_c_t_i_o_n_L_a_b_e_l_S_t_r_i_n_g resource in SelectionBox,
- renamed for Command. The default may vary depending on
- the value of the _X_m_N_s_t_r_i_n_g_D_i_r_e_c_t_i_o_n resource and the
- locale. In the C locale the default is ">".
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss
- Command inherits behavior and resources from the following
- superclasses. For a complete description of each resource,
- refer to the man page for that superclass.
-
- XXXXmmmmSSSSeeeelllleeeeccccttttiiiioooonnnnBBBBooooxxxx RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- _____________________________________________________________________________________________________
- XmNapplyCallback XmCCallback XtCallbackList NULL N/A
- XmNapplyLabelString XmCApplyLabelString XmString dynamic N/A
- XmNcancelCallback XmCCallback XtCallbackList NULL N/A
- XmNcancelLabelString XmCCancelLabelString XmString dynamic N/A
- XmNchildPlacement XmCChildPlacement unsigned char XmPLACE_ABOVE_SELECTION CSG
- XmNdialogType XmCDialogType unsigned char XmDIALOG_COMMAND G
- XmNhelpLabelString XmCHelpLabelString XmString dynamic N/A
- XmNlistItemCount XmCItemCount int 0 CSG
- XmNlistItems XmCItems XmStringTable NULL CSG
- XmNlistLabelString XmCListLabelString XmString NULL N/A
- XmNlistVisibleItemCount XmCVisibleItemCount int dynamic CSG
- XmNminimizeButtons XmCMinimizeButtons Boolean False N/A
- XmNmustMatch XmCMustMatch Boolean False N/A
- XmNnoMatchCallback XmCCallback XtCallbackList NULL N/A
- XmNokCallback XmCCallback XtCallbackList NULL N/A
- XmNokLabelString XmCOkLabelString XmString dynamic N/A
- XmNselectionLabelString XmCSelectionLabelString XmString dynamic CSG
- XmNtextAccelerators XmCTextAccelerators XtAccelerators default C
- XmNtextColumns XmCColumns short dynamic CSG
- XmNtextString XmCTextString XmString "" CSG
-
-
- XXXXmmmmBBBBuuuulllllllleeeettttiiiinnnnBBBBooooaaaarrrrdddd RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- __________________________________________________________________________________
-
-
-
-
-
- Page 3 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- XmNallowOverlap XmCAllowOverlap Boolean True CSG
- XmNautoUnmanage XmCAutoUnmanage Boolean False N/A
- XmNbuttonFontList XmCButtonFontList XmFontList dynamic N/A
- XmNcancelButton XmCWidget Widget NULL N/A
- XmNdefaultButton XmCWidget Widget NULL N/A
- XmNdefaultPosition XmCDefaultPosition Boolean False CSG
- XmNdialogStyle XmCDialogStyle unsigned char dynamic CSG
- XmNdialogTitle XmCDialogTitle XmString NULL CSG
- XmNfocusCallback XmCCallback XtCallbackList NULL C
- XmNlabelFontList XmCLabelFontList XmFontList dynamic CSG
- XmNmapCallback XmCCallback XtCallbackList NULL C
- XmNmarginHeight XmCMarginHeight Dimension 10 CSG
- XmNmarginWidth XmCMarginWidth Dimension 10 CSG
- XmNnoResize XmCNoResize Boolean False CSG
- XmNresizePolicy XmCResizePolicy unsigned char XmRESIZE_NONE CSG
- XmNshadowType XmCShadowType unsigned char XmSHADOW_OUT CSG
- XmNtextFontList XmCTextFontList XmFontList dynamic CSG
- XmNtextTranslations XmCTranslations XtTranslations NULL C
- XmNunmapCallback XmCCallback XtCallbackList NULL C
-
-
- XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- _________________________________________________________________________________________________
- XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
- XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNforeground XmCForeground Pixel dynamic CSG
- XmNhelpCallback XmCCallback XtCallbackList NULL C
- XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
- XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
- XmNinitialFocus XmCInitialFocus Widget dynamic CSG
- XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG
- XmNshadowThickness XmCShadowThickness Dimension dynamic CSG
- XmNstringDirection XmCStringDirection XmStringDirection dynamic CG
- XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
- XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
- XmNtraversalOn XmCTraversalOn Boolean True CSG
- XmNunitType XmCUnitType unsigned char dynamic CSG
- XmNuserData XmCUserData XtPointer NULL CSG
-
-
- CCCCoooommmmppppoooossssiiiitttteeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- ______________________________________________________________________
- XmNchildren XmCReadOnly WidgetList NULL G
- XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG
- XmNnumChildren XmCReadOnly Cardinal 0 G
-
-
- CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
-
-
-
-
-
- Page 4 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- ______________________________________________________________________________________________________________
- XmNaccelerators XmCAccelerators XtAccelerators dynamic N/A
- XmNancestorSensitive XmCSensitive Boolean dynamic G
- XmNbackground XmCBackground Pixel dynamic CSG
- XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
- XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNborderWidth XmCBorderWidth Dimension 0 CSG
- XmNcolormap XmCColormap Colormap dynamic CG
- XmNdepth XmCDepth int dynamic CG
- XmNdestroyCallback XmCCallback XtCallbackList NULL C
- XmNheight XmCHeight Dimension dynamic CSG
- XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
- XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
- XmNscreen XmCScreen Screen * dynamic CG
- XmNsensitive XmCSensitive Boolean True CSG
- XmNtranslations XmCTranslations XtTranslations dynamic CSG
- XmNwidth XmCWidth Dimension dynamic CSG
- XmNx XmCPosition Position 0 CSG
- XmNy XmCPosition Position 0 CSG
-
-
- CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
- A pointer to the following structure is passed to each
- callback:
- typedef struct
- {
- int rrrreeeeaaaassssoooonnnn;
- _X_E_v_e_n_t **** eeeevvvveeeennnntttt;
- _X_m_S_t_r_i_n_g vvvvaaaalllluuuueeee;
- _i_n_t lllleeeennnnggggtttthhhh;
- } _X_m_C_o_m_m_a_n_d_C_a_l_l_b_a_c_k_S_t_r_u_c_t;
-
- rrrreeeeaaaassssoooonnnn
- Indicates why the callback was invoked
-
- eeeevvvveeeennnntttt
- Points to the _X_E_v_e_n_t that triggered the callback
-
- vvvvaaaalllluuuueeee
- Specifies the _X_m_S_t_r_i_n_g in the CommandArea
-
- lllleeeennnnggggtttthhhh
- Specifies the size of the command in _X_m_S_t_r_i_n_g
-
- TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss
- XmCommand inherits translations from XmSelectionBox.
-
- AAAAcccccccceeeelllleeeerrrraaaattttoooorrrrssss
- The _X_m_N_t_e_x_t_A_c_c_e_l_e_r_a_t_o_r_s from XmSelectionBox are added to the
- Text descendant of XmCommand.
-
-
-
- Page 5 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- AAAAccccttttiiiioooonnnn RRRRoooouuuuttttiiiinnnneeeessss
- The XmCommand action routines are described below:
-
- _S_e_l_e_c_t_i_o_n_B_o_x_U_p_O_r_D_o_w_n(_0|_1|_2|_3):
- When called with a 0 argument, selects the previous
- item in the history list and replaces the text with
- that item.
-
- When called with a 1 argument, selects the next item in the
- history list and replaces the text with that item.
-
- When called with a 2 argument, selects the first item in the
- history list and replaces the text with that item.
-
- When called with a 3 argument, selects the last item in the
- history list and replaces the text with that item.
-
- Calls the callbacks for _X_m_N_c_o_m_m_a_n_d_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k.
-
- AAAAddddddddiiiittttiiiioooonnnnaaaallll BBBBeeeehhhhaaaavvvviiiioooorrrr
- The Command widget has the additional behavior described
- below:
-
- _M_A_n_y _K_C_a_n_c_e_l:
- If the parent of the Command is a manager, the event is
- passed to the parent.
-
- _K_A_c_t_i_v_a_t_e in Text:
- Calls the Text widget's _X_m_N_a_c_t_i_v_a_t_e_C_a_l_l_b_a_c_k callbacks.
- If the text is empty, this action then returns.
- Otherwise, if the history list has _X_m_N_h_i_s_t_o_r_y_M_a_x_I_t_e_m_s
- items, it removes the first item in the list. It adds
- the text to the history list as the last item, clears
- the text, and calls the _X_m_N_c_o_m_m_a_n_d_E_n_t_e_r_e_d_C_a_l_l_b_a_c_k
- callbacks.
-
- <_K_e_y> in Text:
- When any change is made to the text edit widget, this
- action calls the callbacks for
- _X_m_N_c_o_m_m_a_n_d_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k.
-
- <_D_o_u_b_l_e_C_l_i_c_k> or <_K_A_c_t_i_v_a_t_e> in List:
- Calls the List widget's _X_m_N_d_e_f_a_u_l_t_A_c_t_i_o_n_C_a_l_l_b_a_c_k
- callbacks. If the history list has _X_m_N_h_i_s_t_o_r_y_M_a_x_I_t_e_m_s
- items, this action removes the first item in the list.
- It adds the selected List item to the history list as
- the last item, clears the text, and calls the
- _X_m_N_c_o_m_m_a_n_d_E_n_t_e_r_e_d_C_a_l_l_b_a_c_k callbacks.
-
- <_F_o_c_u_s_I_n>:
- Calls the callbacks for _X_m_N_f_o_c_u_s_C_a_l_l_b_a_c_k.
-
-
-
-
- Page 6 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmmmmmaaaannnndddd((((3333XXXX))))
-
-
-
- <_M_a_p_W_i_n_d_o_w>:
- When a Command that is the child of a DialogShell is
- mapped, this action calls the callbacks for
- _X_m_N_m_a_p_C_a_l_l_b_a_c_k.
-
- <_U_n_m_a_p_W_i_n_d_o_w>:
- When a Command that is the child of a DialogShell is
- unmapped, this action calls the callbacks for
- _X_m_N_u_n_m_a_p_C_a_l_l_b_a_c_k.
-
- VVVViiiirrrrttttuuuuaaaallll BBBBiiiinnnnddddiiiinnnnggggssss
- The bindings for virtual keys are vendor specific. For
- information about bindings for virtual buttons and keys, see
- _V_i_r_t_u_a_l_B_i_n_d_i_n_g_s(_3_X).
-
- RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
- _C_o_m_p_o_s_i_t_e(_3_X), _C_o_n_s_t_r_a_i_n_t(_3_X), _C_o_r_e(_3_X),
- _X_m_B_u_l_l_e_t_i_n_B_o_a_r_d(_3_X), _X_m_C_o_m_m_a_n_d_A_p_p_e_n_d_V_a_l_u_e(_3_X),
- _X_m_C_o_m_m_a_n_d_E_r_r_o_r(_3_X), _X_m_C_o_m_m_a_n_d_G_e_t_C_h_i_l_d(_3_X),
- _X_m_C_o_m_m_a_n_d_S_e_t_V_a_l_u_e(_3_X), _X_m_C_r_e_a_t_e_C_o_m_m_a_n_d(_3_X), _X_m_M_a_n_a_g_e_r(_3_X),
- and _X_m_S_e_l_e_c_t_i_o_n_B_o_x(_3_X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 7 (printed 11/11/03)
-
-
-
-